package com.maple.soa.service.impl;

import com.maple.soa.dao.UserMapper;
import com.maple.soa.pojo.User;
import com.maple.soa.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author lijian
 * @date 2020/7/15
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public void save(User user) {
        userMapper.save(user);
    }

    @Override
    public List<User> listAll() {
        return userMapper.listAll();
    }

    @Override
    public User getById(Long id) {
        return userMapper.getById(id);
    }
}
